import com.google.common.base.Preconditions;

public class Warmer {

	private Pot pot;

	public Pot removePot() {
		Preconditions.checkState(pot != null);
		Pot removed = pot;
		pot = null;
		return removed;
	}

	public void addPot(Pot pot) {
		Preconditions.checkState(pot == null);
		this.pot = pot;
	}

	public void fill() {
		Preconditions.checkState(pot != null);
		Preconditions.checkState(pot.isEmpty());
		pot.fill();
	}

	public boolean hasEmptyPot() {
		return pot != null && pot.isEmpty();
	}
}
